package com.lee;

import com.lee.config.HelloServiceConfigurationProperties;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description TODO
 * @Author winston
 * @DateTime 2021/11/24
 */
public class HelloService {

	private String endChar;

	public HelloService(String endChar) {
		this.endChar = endChar;
	}

	@Autowired
	private HelloServiceConfigurationProperties helloServiceConfiguration;

	public String sayHello(String name) {
		return helloServiceConfiguration.getPrefix() +
				helloServiceConfiguration.getSeparator()+
				name +
				helloServiceConfiguration.getSeparator()+
				helloServiceConfiguration.getSuffix()+
				endChar;

	}
}
